module 2_4_counter(
	input sys_clk,
	input sys_rst_n,
	output reg flag
);		
parameter CNT_MAX = 24_999_999;
reg [24:0] cnt;

always @(posedge sys_clk or negedge sys_rst_n)
	if(!sys_rst_n)
		cnt <= 25'b0;
	else if(cnt == CNT_MAX)
		cnt <= 25'b0;
	else 
		cnt <= cnt + 1'b1;

always @(posedge sys_clk or negedge sys_rst_n)
		if(!sys_rst_n)
			flag <= 1'b0;
		else if(cnt==CNT_MAX)
			flag = ~flag;
		else 
			flag = flag;
endmodule